import request from '@/utils/request'

export function loginByMobile(Mobile,Password,Type) {
  var data = {
    Mobile,
    Password,
    Type:7
  } 
  data = '=' + encodeURIComponent(Base64.encode(JSON.stringify(data)))
  return request({
    url: '/Master/Login/Login',
    method: 'post',
    data,
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
  })
}

export function logout(SessionId) {
  var data = {
   SessionId
  } 
  data = '=' + encodeURIComponent(Base64.encode(JSON.stringify(data)))
  return request({
    url: '/Master/Login/Login',
    method: 'post',
    data,
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
  })
}

export function getUserInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

